package com.item.service;

import com.item.dao.NoteMapper;
import com.item.dao.model.Note;
import com.item.dao.model.NoteExample;
import com.item.daoEx.NoteMapperEx;

import java.util.List;
import java.util.Map;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class NoteService {
    @Autowired
    private NoteMapper noteMapper;
    
    @Autowired
    private NoteMapperEx noteMapperEx;


    private static final Logger logger = Logger.getLogger(NoteService.class);

    public int countByExample(NoteExample example) {
        return this.noteMapper.countByExample(example);
    }

    public Note selectByPrimaryKey(String id) {
        return this.noteMapper.selectByPrimaryKey(id);
    }

    public List<Note> selectByExample(NoteExample example) {
        return this.noteMapper.selectByExample(example);
    }

    public int deleteByPrimaryKey(String id) {
        return this.noteMapper.deleteByPrimaryKey(id);
    }

    public int updateByPrimaryKeySelective(Note record) {
        return this.noteMapper.updateByPrimaryKeySelective(record);
    }

    public int updateByPrimaryKey(Note record) {
        return this.noteMapper.updateByPrimaryKey(record);
    }

    public int deleteByExample(NoteExample example) {
        return this.noteMapper.deleteByExample(example);
    }

    public int updateByExampleSelective(Note record, NoteExample example) {
        return this.noteMapper.updateByExampleSelective(record, example);
    }

    public int updateByExample(Note record, NoteExample example) {
        return this.noteMapper.updateByExample(record, example);
    }

    public int insert(Note record) {
        return this.noteMapper.insert(record);
    }

    public int insertSelective(Note record) {
        return this.noteMapper.insertSelective(record);
    }
    
    public List<Note> selectMyCollectNotes(Map<?,?> map){
    	return this.noteMapperEx.selectMyCollectNotes(map);
    }
}